<?php
require_once 'FModel/Common/BaseFactory.php';

final class CmsDaoFactory extends BaseFactory {
	private static $instance = null;
	
	const SCOPE = 'CmsDao';
	
	/**
	 * @return CmsDaoFactory
	 */
	public static function getInstance() {
		if (!self::$instance) {
			self::$instance = new self();
		}
		return self::$instance;
	}
	
	/**
	 * @return CmsCategoryDao
	 */
	public function createCmsCategoryDao() {
		return $this->container->createObjectInstance(self::SCOPE, 'CmsCategoryDao', 'Models/Cms/Dao/CmsCategoryDao.php');
	}
	
	/**
	 * @return CmsArticleDao
	 */
	public function createCmsArticleDao() {
		return $this->container->createObjectInstance(self::SCOPE, 'CmsArticleDao', 'Models/Cms/Dao/CmsArticleDao.php');
	}
}
